﻿using MySql.Data.Entity;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;

namespace TaoPortal.DataAccess
{
    public class Configuration : DbConfigurationTypeAttribute
    {
        public Configuration()
            : base(GetConfiguration())
        {
        }

        private static Type GetConfiguration()
        {
            if (DataContext.GetDBConn() == "MySqlConn")
                return typeof(MySqlEFConfiguration);
            else
                return typeof(DbConfiguration);
        }
    }
}
